#ifndef __REMOTECONTROL_RC_PROTOCOL_H__
#define __REMOTECONTROL_RC_PROTOCOL_H__

/*  Major Commonds  */

#define RC_MAJOR_CMD_LOGINDEVICE            0x1000
#define RC_MAJOR_CMD_LOGOUTDEVICE           0x1001
#define RC_MAJOR_CMD_KEY                    0x2000
#define RC_MAJOR_CMD_MOUSE                  0x3000

/*  Minor Commonds  */

#define RC_MINOR_CMD_KEY_DOWN               0x2000
#define RC_MINOR_CMD_KEY_PRESSED            0x2001
#define RC_MINOR_CMD_KEY_UP                 0x2002
#define RC_MINOR_CMD_MOUSE_LBUTTON_DOWN     0x3000
#define RC_MINOR_CMD_MOUSE_LBUTTON_PRESSED  0x3000
#define RC_MINOR_CMD_MOUSE_LBUTTON_UP       0x3000
#define RC_MAJOR_CMD_KEY                    0x2000
#define RC_MAJOR_CMD_MOUSE                  0x3000

/*  Error Codes     */

#define RC_ERROR_SUCCESS                    0x00
#define RC_ERROR_AUTHENTICATE_FAILED        0x01
#define RC_ERROR_UNKNOWN                    0xFF



/*  struct associated with commands */

// RC_MAJOR_CMD_LOGINDEVICE
typedef struct {
    char password[16];
} rc_loginparam_t;



/*  struct of main */

typedef struct {
    int major;
    int minor;
    int bytes;
    int error;
} rc_commond_head_t;

typedef struct {
    rc_commond_head_t   head;
    char                body[256];
} rc_commond_pack_t;

#endif
